package cn.tedu.spring.scope;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * 单实例[默认](singleton) 和 多实例(prototype)
 * 注解: scope()注解
 */

//单实例:@Scope("singleton"),在创建IoC容器时,将Bean对象创建并存放在容器中.
@Scope("prototype")
@Component
public class DBConnect {
}










